package top.shiyiri.spring5.service;

import top.shiyiri.spring5.dao.UserDao;

/**
 * @author Aunean
 * @date 2022/2/16 18:36
 */
public class UserService {
    //创建 UserDao 类型属性，生成 set 方法
    private UserDao userDao;
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
    //原始方式：创建UserDao对象
//    private UserDao userDao = new UserDaoImpl();
    public void add() {
        System.out.println("service add......");
        userDao.update();
    }
}
